package com.winning.pmph.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.google.common.collect.Lists;
import lombok.Data;

import javax.persistence.Table;
import java.util.List;

@Data
@Table(name = "RESOURCE")
public class Resource extends BaseEntity {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @TableId
    private String id;
    /**
     * 资源名称
     */
    private String name;
    /**
     * 资源地址
     */

    private String url;
    /**
     * 父节点ID
     */

    private String parentId;
    /**
     * 排序
     */

    private Integer sortNum;
    /**
     * 图标
     */

    private String icon;

    @TableField(exist = false)
    private List<Resource> children = Lists.newArrayList();
    @TableField(exist = false)
    private boolean editButton;
    @TableField(exist = false)
    private boolean pushButton;
    @TableField(exist = false)
    private boolean detailButton;
    @TableField(exist = false)
    private String roleIds;
}
